﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>lhgdialog - 窗口内容页间的传值</title>
	<style type="text/css">
body, div, h1, h2, h3, h4, h5, h6, pre, code, p { margin: 0; padding: 0; }
body{ font:12px Verdana,Arial,sans-serif; color: #7d7d7d; }
#main{ width:350px; margin:10px; border: solid #d3d3d3 2px; margin-left: auto; margin-right: auto; }
#main .tabContent{ padding:15px; }
#main .tabContent h2{ font-size:14px; height:30px; line-height:30px; text-align:center; color:#000; background-color:#eee; font-weight:bold; }
#main .tabContent p{ padding:3px 0; }
button {white-space: nowrap;}
#main .tabContent button { font-size:12px; padding:2px 8px; background-color:#e3e3e3; border:solid 1px #ccc; cursor:pointer; }
#main .tabContent button:hover { background: #f2f2f2; }
	</style>
	<script type="text/javascript" src="../lhgcore.min.js"></script>
	<script type="text/javascript">
var dg = frameElement.lhgDG;

J(function(){
	J('#btn2').click(function(){
	    alert( J('#b1',dg.opt.parent.dgDoc).val() );
	});
	
	J('#btn3').click( dg.opt.parent.dgWin.BB );
	
	J('#btn4').click( dg.cancel );
	
	J('#btn5').click(function(){
	    alert( J('#a1',dg.curDoc).val() );
	});
	
	J('#btn6').click( dg.curWin.AA );
	
	J('#btn7').click(function(){
	    dg.cancel();
		dg.opt.parent.cancel();
	});
});

function CC()
{
    alert( '我是C窗口上的一个函数' );
}
	</script>
</head>

<body>

<div id="main">
<div class="tabContent">
    <h2>此窗口为C窗口</h2>
	<p><input id="c1" size="30" type="text" value="C窗口的文本框"/></p>
	<p><button class="runCode" id="btn2" title="btn2">调用B页面的文本框的值</button></p>
	<p><button class="runCode" id="btn3" title="btn3">调用B页面的函数</button></p>
	<p><button class="runCode" id="btn4" title="btn4">关闭C窗口</button></p>
	<h2>C窗口为B窗口弹出的子窗口</h2>
	<p><button class="runCode" id="btn5" title="btn5">调用A窗口的文本框的值</button></p>
	<p><button class="runCode" id="btn6" title="btn6">调用A窗口的函数</button></p>
	<p><button class="runCode" id="btn7" title="btn7">同时关闭B窗口和C窗口</button></p>
</div>
</div>

</body>
</html>